package com.aabte.memoryoverflow;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Daniel
 */
public class Heap {

    public static void main(String[] args) {

        /*

        -Xms10m -Xmx10m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=C:/logs/jvm/java.hprof

         */

        List<Object> list = new ArrayList<Object>();
        while (true){
            list.add(new Object());
        }

    }

}
